home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- # $1 has the path to the source package
- # $2 has the path to the target folder
- # $3 has the path to the target volume
- # $USER has the name of the user who launched the installer
-
-
- # the extension is placed in /System/Library/Extensions folder
- EXTENSION="/System/Library/Extensions/LogitechUSBHIDevices.kext"
- # most other files in application support
- DAEMON="/Library/Application Support/Logitech/LCCDaemon.app"
- APPFLDR="/Library/Application Support/Logitech"
- # and pref pane in system wide preference panes folder
- PPANE="/Library/PreferencePanes/Logitech Control Center.prefPane"
-
-
- # set permissions for all installed components
-
- $3/usr/sbin/chown -R root:admin "$3/$EXTENSION"
- $3/bin/chmod -R 775 "$3/$EXTENSION"
-
- $3/usr/sbin/chown -R root:admin "$3/$APPFLDR"
- $3/bin/chmod -R 775 "$3/$APPFLDR"
-
- $3/usr/sbin/chown -R root:admin "$3/$PPANE"
- $3/bin/chmod -R 775 "$3/$PPANE"
-
- # be sure that the system realizes that something changed, and rebuild extension cache
- $3/usr/bin/touch "$3/Library/PreferencePanes"
- $3/usr/bin/touch "$3/System/Library/Extensions"
-
- kextload /System/Library/Extensions/LogitechUSBHIDevices.kext
- # Install the daemon in user's login items:
-
- ThisUserId=`/usr/bin/id -u $USER`
- "$1/Contents/Resources/autolaunch" "$3/$DAEMON" $ThisUserId
-
- #At that point there are good chances that plugging a device works correctly without restarting.
- #however, as we cannot guarantee that no one was plugged before (in this case the Apple KEXT has
- #taken our device, or that the previous KEXT was unloaded, we prefer to ask for restart.
-
- exit 0